<template>
  <div class="box">
    <div v-if="$slots.left" class="left">
      <i class="el-icon-info" />
      <!-- 啊就开始了都放假了卡上 -->
      <slot name="left" />
    </div>
    <div class="right">
      <!-- <el-button type="info" size="small">信息按钮</el-button> -->
      <!-- 插槽，作用：占位符， 给谁占位置？给父组件传进来的html代码 -->
      <slot name="right" />
      <!-- <el-button type="warning" size="small">警告按钮</el-button>
      <el-button type="danger" size="small">危险按钮</el-button>-->
    </div>
  </div>
</template>

<script>
export default {
  name: 'Tips',
  components: {},
  props: {},
  data() {
    return {

    }
  },
  computed: {},
  watch: {},
  created() {
    console.log(this.$slots)
  },
  mounted() {},
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.box {
  display: flex;
  // justify-content: space-between;
  justify-content: flex-start; // 默认值
  align-items: center;
  height: 60px;
  .left {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0px 10px;
    border-radius: 3px;
    border: 1px solid rgba(145, 213, 255, 1);
    background: rgba(230, 247, 255, 1);
    i {
      margin-right: 5px;
      color: #409eff;
    }
  }
  .right {
    margin-left: auto;
  }
}
</style>
